package com.ytjj.qmyx.supplychain.common.enums;

import lombok.Getter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author jiawei
 * @date 2023年03月30日 14:35
 * @describe 短信签名枚举
 */
@Getter
public enum SmsSignEnum {
    SGX_KEJI("【闪购星】");

    /**
     * JU_MAI_DUO("【聚卖多】"),
     *     YI_QUAN_SHANG_CHENG("【xxxx商城】"),
     *     YI_GOU_YAN_XUAN("【xxxx严选】"),
     *     JC_YAN_XUAN("【xxxx严选】"),
     *     YX_HAO_DUI("【xxxx】"),
     *     ZX_LIANG_MALL("【臻芯良品】");
     */



    /**
     * 签名
     */
    private String signName;

    SmsSignEnum(String signName) {
        this.signName = signName;
    }

    /**
     * 获得所有的签名
     */
    public static List<String> getAllSign() {
        SmsSignEnum[] values = SmsSignEnum.values();
        List<String> classifyNames = new ArrayList<>();
        for (SmsSignEnum value : values) {
                classifyNames.add(value.getSignName());
        }
        return classifyNames;
    }

    /**
     * 短信签名是佛存在
     */
    public static boolean isExist(String signName) {
        boolean b = Arrays.stream(SmsSignEnum.values()).anyMatch(e -> e.getSignName().equals(signName));
        return b;
    }

}
